Collectible NUG
Overview
The Collectible NUG provides a data-driven way to define, place, collect, and track pickup items.
Use it for coins, gems, keys, tokens, quest items, or any item that needs to increase a stored amount when collected.
Core Classes
PDA_CollectibleDefinitionBP_BaseCollectibleAC_CollectibleWallet
What The System Does
- Stores collectible definitions in data assets
- Lets level designers place collectibles without rebuilding logic
- Sends collected values into the player wallet component
- Supports different collectible types
- Supports variable collectible values
- Can connect to doors, UI, save data, quests, and mascot reactions later
Quick Setup
Use this section to create one working collectible pickup.
- Add
AC_CollectibleWalletto the player character. - Create a
PDA_CollectibleDefinition. - Set the collectible name, icon, tag, value, and display colour.
- Place
BP_BaseCollectiblein the level. - Assign the collectible data asset to the placed collectible.
- Press Play.
- Overlap the collectible.
- Check that the wallet value updates.
Runtime Flow
- Player overlaps
BP_BaseCollectible. - The collectible checks it has a valid
PDA_CollectibleDefinition. - The collectible sends the definition and amount to
AC_CollectibleWallet. - The wallet reads the collectible type.
- The wallet adds the amount to the matching stored total.
- The collectible hides, destroys itself, or marks itself collected.
- UI, doors, save logic, and other systems can read the updated wallet value.
Blueprint Tutorial
Goal
Create one working collectible pickup that adds value to the player wallet.
Before You Start
Create or confirm these assets exist:
PDA_CollectibleDefinitionBP_BaseCollectibleAC_CollectibleWallet- A player character Blueprint
Step 1, Add The Wallet To The Player
- Open the player character Blueprint.
- Add
AC_CollectibleWalletas an Actor Component. - Compile and save.
Step 2, Create A Collectible Data Asset
- Right click in the Content Browser.
- Create a new
PDA_CollectibleDefinition. - Name it something clear, for example
PDA_Gem_Red. - Set the collectible display name.
- Set the value.
- Set the icon if the UI uses one.
- Add gameplay tags if this collectible needs to connect to doors or quests.
Step 3, Set Up The Collectible Actor
- Drag
BP_BaseCollectibleinto the level. - Select the actor.
- Assign the collectible data asset.
- Set the amount override only if this pickup needs a custom value.
- Make sure collision is enabled for overlap.
Step 4, Add The Collection Logic
Inside BP_BaseCollectible, use overlap logic like this:
OnComponentBeginOverlap- Cast or interface check the overlapping actor.
- Get
AC_CollectibleWalletfrom the player. - Call the wallet add function.
- Pass in the collectible definition and amount.
- Destroy or hide the collectible.
Step 5, Test The Result
- Press Play.
- Walk into the collectible.
- Confirm the collectible disappears.
- Print the wallet value to screen or update the HUD.
- Test another collectible with a different data asset.
Photo Slots
Use these slots when adding screenshots to the documentation site.
Collectible Data Asset
Image slot: collectible data asset.
Collectible Actor In Level
Image slot: collectible actor in level.
Wallet Component On Player
Image slot: collectible wallet component on player.
Runtime Test
Image slot: collectible runtime test.
Injected Blueprint Code Slots
Paste exported Unreal Blueprint node text into these blocks when the Blueprint is final.
BP_BaseCollectible, Overlap Collection Logic
Paste exported Blueprint node code here.
AC_CollectibleWallet, Add Collectible Function
Paste exported Blueprint node code here.
UI Update Test
Paste exported Blueprint node code here.
Common Issues
Collectible Does Not Pick Up
Check that the collectible collision is set to overlap the player.
Also check that overlap events are enabled.
Wallet Does Not Update
Check that AC_CollectibleWallet is added to the player character.
If the collectible cannot find the wallet, the pickup may work visually but not store a value.
Wrong Collectible Value Is Added
Check the value inside PDA_CollectibleDefinition.
Also check whether the placed collectible has an amount override.
UI Does Not Update
Check the wallet value first.
Do not debug the UI until you know the collectible amount is changing correctly.
Door Cannot Read The Collectible Amount
Check that the door requirement uses the same collectible data asset or tag as the collectible wallet.
Extension Notes
- Add
OnCollectibleChangedtoAC_CollectibleWalletlater for UI, save data, doors, quests, and mascot reactions - Add collected world state saving for pickups that should not respawn
- Use collectible tags when other systems only need a category instead of a direct data asset reference
- Add VFX and SFX fields to the collectible data asset when polish begins
Testing Checklist
- Player can collect one pickup
- Wallet amount increases correctly
- Different collectible data assets store separately
- Variable value pickups work
- Door checks can read the wallet value
- UI can display the stored amount
- Save data can restore collected progress later